<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::get('/', function () {
    return 'hello,ThinkPHP6!';
});


Route::post('api/auth/register','user/register');//注册用户
Route::post('api/auth/login','user/login');//验证客户端
Route::get('api/auth/token','user/getToken');//获取token

Route::get('api/auth/users','user/getUsers')
    ->middleware(\app\middleware\ApiAuthMiddleware::class);//需要权限验证的接口加上中间件即可实现验证
//Route::get('api/auth/users','user/getUsers');

